<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%
  String username = request.getParameter("username");
  String password = request.getParameter("password");

  if ("zhangsan".equals(username) && "123".equals(password)) {
%>
<p>成功登录，3秒钟后进入loginSuccess.jsp页面</p>
<%
  response.setHeader("Refresh", "3;url=loginSuccess.jsp");
%>
<%
  } else {
    response.sendRedirect("login.jsp");
  }
%>